/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Facade;

import entity.StatementAccount;
import java.util.Collection;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author Vojtisek
 */
@Stateless
public class StatementFacadeBean implements StatementFacadeLocal {

    @PersistenceContext
    private EntityManager em;

    public Collection<StatementAccount> findAll() throws Exception {
        return em.createQuery("select object(o) from StatementAccount as o").getResultList();

    }
    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method" or "Web Service > Add Operation")
}
